@inherits CmsWebViewPage

@{
	Layout = "_main.cshtml";

	var cats = CmsPage.GetSiteCategories(10, true);
	var tags = CmsPage.GetSiteTags(10, true);

	var pagecat = CmsPage.GetPageCategories(10);
	var pagetag = CmsPage.GetPageTags(10);
}

@section SideBar {
	<ul>
		<li>
			@if (cats.Any()) {
				<h2>Categories</h2>
				<ul class="sidemenu">
					@foreach (var itm in cats) {
						<li><a href="@itm.Uri">@itm.Text @String.Format(" ({0})", itm.Count)</a></li>
					}
				</ul>
			}
		</li>
		<li>
			@if (tags.Any()) {
				<h2>Tags</h2>
				<ul class="sidemenu">
					@foreach (var itm in tags) {
						<li><a href="@itm.Uri">@itm.Text @String.Format(" ({0})", itm.Count)</a></li>
					}
				</ul>
			}
		</li>
	</ul>
}

@section MetaTags {

	<div class="meta">
		@foreach (var itm in pagecat) {
			<span class="meta-item"><a href="@itm.Uri">@itm.Text</a></span>
		}
	</div>

	<div class="meta">
		@foreach (var itm in pagetag) {
			<span class="meta-item"><a href="@itm.Uri">@itm.Text</a></span>
		}
	</div>

}